<route lang="json5" type="page">
{
  layout: 'default',
  style: {
    navigationBarTitleText: '轮播图',
  },
}
</route>

<template>
  <view class="mx-2">
    <wd-swiper
      :list="swiperList"
      autoplay
      v-model:current="current"
      @tap="handleClick"
      @change="onChange"
    ></wd-swiper>
  </view>
</template>

<script lang="ts" setup>
const current = ref<number>(0)

const swiperList = ref([
  'http://localhost:8084/api/static/banner001.png',
  'http://localhost:8084/api/static/banner002.png',
  'http://localhost:8084/api/static/banner003.png',
])
function handleClick(e) {
  console.log(e)
}
function onChange(e) {
  console.log(e)
}
</script>

<style lang="scss" scoped>
//
</style>
